import fetchJsonp from "fetch-jsonp";

let baseUrl = ["https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd="];

const api = {
  baidu: async (keyword) => {
    const res = await fetchJsonp(baseUrl[0] + keyword, {
      jsonpCallback: "cb",
    });
    const json = res.json();
    return json;
  },
};

export default api;
